<template>
  拦截
  <el-form :model="users" label-width="80px" v-for="user in users">
    <el-form-item prop="username">
      <div>{{user.username}}</div>
    </el-form-item>
    <el-form-item prop="phone">
      <div>{{user.phone}}</div>
    </el-form-item>
    <el-form-item prop="headImg">
      <img :src="user.headImg" alt="">
    </el-form-item>
  </el-form>
</template>

<script setup lang="ts">
import {ref} from 'vue'
import {getAllUsersService} from "@/api/user.js";

const users = ref({
  username: '',
  phone: '',
  headImg: ''
})

async function getAllUserList(){
  let result = await getAllUsersService();
  users.value = result.data
}

getAllUserList()
</script>

<style scoped>

</style>